/************************************************************
 * Copyright (C), 2022-2030, ripnano. Co., Ltd.
 * FileName:        form_factory.h
 * Author:          Dan Yin
 * Date:            2024-03-04
 * Description:     the class of factory maintenance window
 * Version:         1.0.0.0
 **********************************************************/

#ifndef FORM_FACTORY_H
#define FORM_FACTORY_H

// add necessary includes here
#include "ui/defines/global.h"

namespace Ui {
class FormFactory;
}

class FormFactory : public QWidget
{
    Q_OBJECT

public:
    // Get an instance of "FormFactory" class, if exist, return it
    static FormFactory* getInstance(QWidget *pParent = nullptr);

    // The default destructor
    virtual ~FormFactory();

signals:
    // The signal that refresh UI info
    void signalRefreshUI();

    // Show the sample type manage
    void signalShowPageSampleManage();

    // Show the UV disinfection window
    void signalShowPageUvDisinfection();

    // Show the kit manage window
    void signalShowPageKitManage();

    // Show the process debug window
    void signalShowPageProcessDebug();

    // Show the PCR debug window
    void signalShowPagePcrDebug();

    // Show the motor debug window
    void signalShowPageMotorDebug();

    // Show the module coding window
    void signalShowPageModuleCoding();

    // Show the heating debug window
    void signalShowPageHeatingDebug();

    // Show the extract debug window
    void signalShowPageExtractDebug();

    // Show the factory params setting window
    void signalShowPageFactoryParams(int nType);

    // Show the self-checking window
    void signalShowPageSelfChecking();

    // Show the device notify page
    void signalShowPageDeviceNotify();

private slots:
    // The slot that refresh UI info
    void slotRefreshUI();

    // Show UVC disinfection page
    void on_pushButton_UvDisinfection_clicked();

    // Show process debug page
    void on_pushButton_ProcessDebug_clicked();

    // Show module coding page
    void on_pushButton_ModuleCoding_clicked();

    // Show motor debug page
    void on_pushButton_MotorDebug_clicked();

    // Show module heating debug page
    void on_pushButton_HeatingDebug_clicked();

    // Show extract debug page
    void on_pushButton_ExtractDebug_clicked();

    // Show factory params setting page
    void on_pushButton_FactoryParams_clicked();

    // Show self checking page
    void on_pushButton_SelfChecking_clicked();

    // Show setting system notify page
    void on_pushButton_Notify_clicked();

    // Show Mixing speed configuration page
    void on_pushButton_MixingSpeed_clicked();

protected:
    // Triggers an event before it is switch language
    void changeEvent(QEvent *event);

private:
    // The default constructor
    explicit FormFactory(QWidget *parent = nullptr);

    // After constructing object, initialize the object
    void _initialze();

    // Init the window style
    void _initUi();

private:
    Ui::FormFactory *ui;

};

#endif // FORM_FACTORY_H
